Integrand size = 16, antiderivative size = 135 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4} \]
[Out]
Time = 0.23 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {14, 3832, 3800, 2221, 2611, 6744, 2320, 6724} \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^2}{2}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {1}{2} i b x^2 \]
[In]
[Out]
Rule 14
Rule 2221
Rule 2320
Rule 2611
Rule 3800
Rule 3832
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = \int \left (a x+b x \tan \left (c+d \sqrt {x}\right )\right ) \, dx \\ & = \frac {a x^2}{2}+b \int x \tan \left (c+d \sqrt {x}\right ) \, dx \\ & = \frac {a x^2}{2}+(2 b) \text {Subst}\left (\int x^3 \tan (c+d x) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a x^2}{2}+\frac {1}{2} i b x^2-(4 i b) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x^3}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right ) \\ & = \frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {(6 b) \text {Subst}\left (\int x^2 \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d} \\ & = \frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {(6 i b) \text {Subst}\left (\int x \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2} \\ & = \frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {(3 b) \text {Subst}\left (\int \operatorname {PolyLog}\left (3,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3} \\ & = \frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {(3 i b) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(3,-x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4} \\ & = \frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4} \\ \end{align*}
Time = 0.03 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.00 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4} \]
[In]
[Out]
\[\int x \left (a +b \tan \left (c +d \sqrt {x}\right )\right )d x\]
[In]
[Out]
\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )} x \,d x } \]
[In]
[Out]
\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int x \left (a + b \tan {\left (c + d \sqrt {x} \right )}\right )\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 359 vs. \(2 (102) = 204\).
Time = 0.39 (sec) , antiderivative size = 359, normalized size of antiderivative = 2.66 \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\frac {3 \, {\left (d \sqrt {x} + c\right )}^{4} a + 3 i \, {\left (d \sqrt {x} + c\right )}^{4} b - 12 \, {\left (d \sqrt {x} + c\right )}^{3} a c - 12 i \, {\left (d \sqrt {x} + c\right )}^{3} b c + 18 \, {\left (d \sqrt {x} + c\right )}^{2} a c^{2} + 18 i \, {\left (d \sqrt {x} + c\right )}^{2} b c^{2} - 12 \, {\left (d \sqrt {x} + c\right )} a c^{3} - 12 \, b c^{3} \log \left (\sec \left (d \sqrt {x} + c\right )\right ) + 4 \, {\left (-4 i \, {\left (d \sqrt {x} + c\right )}^{3} b + 9 i \, {\left (d \sqrt {x} + c\right )}^{2} b c - 9 i \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \arctan \left (\sin \left (2 \, d \sqrt {x} + 2 \, c\right ), \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) + 1\right ) + 6 \, {\left (4 i \, {\left (d \sqrt {x} + c\right )}^{2} b - 6 i \, {\left (d \sqrt {x} + c\right )} b c + 3 i \, b c^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}\right ) - 2 \, {\left (4 \, {\left (d \sqrt {x} + c\right )}^{3} b - 9 \, {\left (d \sqrt {x} + c\right )}^{2} b c + 9 \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \log \left (\cos \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + \sin \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) + 1\right ) - 12 i \, b {\rm Li}_{4}(-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}) - 6 \, {\left (4 \, {\left (d \sqrt {x} + c\right )} b - 3 \, b c\right )} {\rm Li}_{3}(-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )})}{6 \, d^{4}} \]
[In]
[Out]
\[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )} x \,d x } \]
[In]
[Out]
Timed out. \[ \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx=\int x\,\left (a+b\,\mathrm {tan}\left (c+d\,\sqrt {x}\right )\right ) \,d x \]
[In]
[Out]